﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DB_NH.DB_Map.ywxt.ProjectBZJ
{
    using NHibernate;
    using NHibernate.Mapping.ByCode;
    using NHibernate.Mapping.ByCode.Conformist;

    using DB_NH.DB_Model.ywxt.ProjectBZJ;

    public class ProjectTBSQDetail_Map : ClassMapping<ProjectTBSQDetail>
    {
        public ProjectTBSQDetail_Map()
        {
            //映射ID
            Id(x => x.Id, map =>
            {
                map.Column("r_id");
                map.Length(40);
            });

            Property(x => x.IsValid, map =>
            {
                map.Column("is_valid");
            });

            Property(x => x.CreateDate, map =>
            {
                map.Column("create_date");
            });

            Property(x => x.tbValue, map =>
            {
                map.Column("tb_value");
            });

            Property(x => x.tbRemark, map =>
            {
                map.Column("tb_remark");
                map.Length(10000000);
            });

            Property(x => x.tuiFlag, map =>
            {
                map.Column("r_flag");
            });

            ManyToOne(x => x.pe, map =>
            {
                map.Column("pe_id");
            });

            ManyToOne(x => x.sq, map =>
            {
                map.Column("sq_id");
            });

            Table("t_tb_sq_details");

            //不进行创建
            //SchemaAction(NHibernate.Mapping.ByCode.SchemaAction.None);
        }
    }
}
